package yhao.demo.service.person.apilist.restful;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import yhao.demo.service.person.apilist.form.PersonEditForm;
import yhao.demo.service.person.apilist.form.PersonInsertForm;
import yhao.demo.service.person.apilist.form.PersonQueryForm;
import yhao.demo.service.person.apilist.model.PersonModel;
import yhao.infra.apilist.RequestResult;
import yhao.infra.apilist.validate.IdForm;
import yhao.infra.common.model.Pagination;

/**
 * 人员记录微服务feign
 * Created by yoara on 2019-03-28
 */
@FeignClient(ZoneConstants.FEIGN_URL)
public interface PersonFeign {
    @PostMapping("/person/selectById")
    RequestResult<PersonModel> selectById(IdForm form);

    @PostMapping("/person/insertPerson")
    RequestResult<PersonInsertForm> insertPerson(PersonInsertForm form);

    @PostMapping("/person/editPerson")
    RequestResult<PersonEditForm> editPerson(PersonEditForm form);

    @PostMapping("/person/queryPersonPage")
    RequestResult<Pagination<PersonModel>> queryPersonPage(PersonQueryForm form);

    @PostMapping("/person/deleteById")
    RequestResult<IdForm> deleteById(IdForm form);
}
